<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>BBS</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
	
	<link rel="stylesheet" href="css/bootstrap-theme.min.css">
	<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
	<script src="js/jquery.min.js"></script>
	<script type="text/javascript"src="js/button.js"></script>
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="js/bootstrap.min.js"></script>
	<style>
	button{
		margin-right:20px;
	}
	</style>
  </head>
  
  <body>
  <div class="site-header jumbotron">
  <h1 style="text-align: center">Welcome To BBS!</h1>
  <div style="text-align: right">
  <c:choose>
  <c:when test="${not empty user }">
   <button  class="btn btn-info" id="changepsw">修改密码</button>
  <button  class="btn btn-warning" id="logout">注销</button>
  </c:when>
  <c:otherwise>
  <button  class="btn btn-primary" id="login">登录</button>
  <button  class="btn btn-success" id="register">注册</button>
  </c:otherwise>
  </c:choose>  
  </div>
</div>
<ul class="list-group">
<c:forEach var="cate" items="${cates}">
  <li class="list-group-item" ><a href="content.action?cate=${cate.id }">${cate.name }</a></li>
 </c:forEach>

</ul>
  </body>
</html>
